package org.speed.mes.base.domain.bo;

import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.speed.mes.base.domain.BsMaterial;

import java.math.BigDecimal;

/**
 * 物料业务对象 bs_material
 *
 * @author Lion Li
 * @date 2024-06-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BsMaterial.class, reverseConvertGenerate = false)
public class BsMaterialBo extends BaseEntity {

    /**
     * 物料id
     */
    @NotNull(message = "物料id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 物料编码
     */
    @NotBlank(message = "物料编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 物料名称
     */
    @NotBlank(message = "物料名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 规格型号
     */
    private String model;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unit;

    /**
     * 物料标识
     */
    private String mark;

    /**
     * 物料类型id
     */
    @NotNull(message = "物料类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long typeId;

    /**
     * 物料类型编码
     */
    private String typeCode;

    /**
     * 物料类型名称
     */
    private String typeName;

    /**
     * 是否启用 0停用 1启用
     */
    private String status;

    /**
     * 是否设置安全库存 0不设置 1设置
     */
    private String safeStockFlag;

    /**
     * 最低库存量
     */
    private BigDecimal minStock;

    /**
     * 最大库存量
     */
    private BigDecimal maxStock;

    /**
     * 备注
     */
    private String remark;
}
